package com.yuanrui.practice.server.dao;

import com.yuanrui.practice.server.entity.po.PracticeDetailPO;
import com.yuanrui.practice.server.entity.po.RankPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PracticeDetailDao {
    PracticeDetailPO selectDetail(@Param("practiceId") Long practiceId, @Param("subjectId") Long subjectId,@Param("loginId") String loginId);

    Integer selectCorrectCount(Long practiceId);

    List<PracticeDetailPO> selectByPracticeId(Long practiceId);

    void insertSingle(PracticeDetailPO practiceDetailPO);

    void update(PracticeDetailPO practiceDetailPO);

    PracticeDetailPO selectAnswer(@Param("practiceId") Long practiceId, @Param("subjectId") Long subjectId);

    List<RankPO> getPracticeCount();

    void deleteByPracticeId(Long practiceId);
}
